package com.kepennar.application.domain;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the comments database table.
 * 
 */
@Entity
@Table(name="comments")
public class Comment implements Serializable {
	private static final long serialVersionUID = 1L;
	private int idComments;
	private String content;
	private Account account;
	private Event event;

    public Comment() {
    }


	@Id
	@Column(name="id_comments", unique=true, nullable=false)
	public int getIdComments() {
		return this.idComments;
	}

	public void setIdComments(int idComments) {
		this.idComments = idComments;
	}


    @Lob()
	@Column(nullable=false)
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}


	//bi-directional many-to-one association to Account
    @ManyToOne
	@JoinColumn(name="id_account", nullable=false)
	public Account getAccount() {
		return this.account;
	}

	public void setAccount(Account account) {
		this.account = account;
	}
	

	//bi-directional many-to-one association to Event
    @ManyToOne
	@JoinColumn(name="id_events", nullable=false)
	public Event getEvent() {
		return this.event;
	}

	public void setEvent(Event event) {
		this.event = event;
	}
	
}